#pragma once

#include <QObject>
#include <QKeySequence>

namespace kryptos { namespace util {


class QGlobalShortcutPrivate;

class QGlobalShortcut : public QObject
{
    Q_OBJECT

public:
    explicit QGlobalShortcut(QObject *parent = 0);
    explicit QGlobalShortcut(const QKeySequence& shortcut, QObject* parent = 0);
    virtual ~QGlobalShortcut();

    QKeySequence shortcut() const;

    bool setShortcut(const QKeySequence& shortcut);
    bool isEnabled() const;

public Q_SLOTS:
    void setEnabled(bool enabled = true);
    void setDisabled(bool disabled = true);

Q_SIGNALS:
    void activated();

private:
    friend class QGlobalShortcutPrivate;
    QGlobalShortcutPrivate *_p;
};

}}
